package 蓝桥杯算法;

import java.util.Arrays;

public class aaa {
    public static void main(String[] args) {
        int sort=10;
        for(long i=127;i<=999999999;i++){
            if(getnum(i)){
                sort++;
            }
            if(sort==2023){
                System.out.println(i);
                break;
            }
        }
        int[] a=is(123);
        for(int i=0;i<a.length;i++){
            System.out.println(1);
        }
    }
 public static boolean getnum(long num){
        //十进制
     int sum1=0;
     long a=num;
     while(a>0){
         sum1+=a%10;
         a=a/10;
     }
     if(num%sum1!=0){
         return false;
     }
     //八进制
     int sum2=0;
     long b=num;
     while(b>0){
         sum2+=b%8;
         b=b/8;

     }
     if(num%sum2!=0){
         return false;
     }
     //二进制
     int sum3=0;
     long c=num;
     while(c>0){
         sum3+=c%2;
         c=c/2;
     }
     if(num%sum3!=0){
         return false;
     }
     //十六进制
     int sum4=0;
     long d=num;
     while(d>0){
         sum4+=d%16;
         d=d/16;
     }
     if(num%sum4!=0){
         return false;
     }
     return true;
 }
    public  static  int[] is(int num){
        int[] arr=new int[num];
        int a=num;
        int b=num;
        int index=0;
        while(num>0){
            index++;
            num=num/10;
        }
        for(int i=index-1;i>=0;i--){
            arr[i]=b%10;
            b=b/10;
        }
        return arr;
    }

}
